import { Component, ViewChild } from '@angular/core';
import { Platform, Tabs } from 'ionic-angular';
// all pages
import { HomePage } from './home/home';
import { CatePage } from './cate/cate';
import { LookPage } from './look/look';
import { CartPage } from './cart/cart';
import { SettingsPage } from './settings/settings';

@Component({
  selector: 'page-main-tab',
  templateUrl: 'main-tab.html'
})
export class MainTab {

  @ViewChild('mainTabs') tabs: Tabs;

  isAndroid: boolean = false;

  pages: Array<{title: string, icon: string, component: any}>;

  constructor(
    public platform: Platform
  ) {

    this.isAndroid = platform.is('android');

    // set our app's pages
    this.pages = [
      { title: '首页', icon: 'home', component: HomePage },
      { title: '分类', icon: 'list', component: CatePage },
      { title: '发现', icon: 'search', component: LookPage },
      { title: '购物车', icon: 'cart', component: CartPage },
      { title: '我的', icon: 'settings', component: SettingsPage },
    ];
  }

}
